import request from "/@/utils/request"

//相关试题
export function getTestList(id?: string) {
  return request({
    url: '/train/kszlData/getTestList/'+id,
    method: 'get',
  })
}
//疑问点
export function getQueryList(query?: Object) {
  return request({
    url: '/train/kszlQuery/getQueryList',
    method: 'get',
    params: query
  })
}
//资料列表编辑列表显示
export function getEditList(query?: Object) {
  return request({
    url: '/train/kszlFile/getEditList?' + query,
    method: 'get',
  })
}
//参与组织
export function deptTree(query?: Object) {
  return request({
    url: '/admin/dept/tree2',
    method: 'get',
    params: query
  })
}
//根据部门主键获取岗位列表
export function syspost(obj?: Object) {
  return request({
    url: '/admin/dept/posts/'+obj,
    method: 'get'
  })
}
export function fetchList(query?: Object) {
  return request({
    url: '/train/kszlData/getDataList',
    method: 'get',
    params: query
  })
}
export function addObj(obj?: Object) {
  return request({
    url: '/train/kszlData',
    method: 'post',
    data: obj
  })
}

export function getObj(id?: string) {
  return request({
    url: '/train/kszlData/' + id,
    method: 'get'
  })
}

export function delObjs(ids?: Object) {
  return request({
    url: '/train/kszlData',
    method: 'delete',
    data: ids
  })
}

export function putObj(obj?: Object) {
  return request({
    url: '/train/kszlData',
    method: 'put',
    data: obj
  })
}

//关联资料
export function informationList(query?: Object) {
  return request({
    url: '/train/kszlData/getListForXxrw',
    method: 'get',
    params: query
  })
}
export function fetchList1(query?: Object) {
  return request({
    url: '/train/kszlData/getDataList',
    method: 'get',
    params: query
  })
}
